*************************************
*     PORTB -> PORTA                                              *
*    PIC 16F88                                                               *
*    Ce programme copie le port B sur le port A   *
*************************************

MOVLW 0x00	; Raz registre w
BANKSEL ANSEL	; slection bank 1 (ansel)
MOVWF ANSEL	; Toutes les broches en mode digital
BANKSEL TRISA              ; slection BANK 1
CLRW                                     ; raz w
MOVWF TRISA                   ; port a en sortie
MOVLW 255                        ; 255 -> w
MOVWF TRISB                   ; port b en entre
BANKSEL PORTA           ; slection BANK 0

:debut                                       ;
MOVF PORTB,w                  ; copie portb dans w
MOVWF PORTA                  ; copie w sur porta
goto debut                               ; @PC =@debut

END                                          ; Fin du programme


































































































































